import { configureStore } from '@reduxjs/toolkit'
import userReducer from './userSlice'
import listReducer from './listSlice'
export default configureStore({
	reducer:{
		user:userReducer,
		list:listReducer
	}
})
// export default configureStore({
// 	reducer: {
// 		counter: counterReducer,
// 	}
// })

// import { createStore,combineReducers } from "redux"
// const counterSlice = createSlice({
// 	name:'counter',
// 	state:{
// 		user:{
// 			username:"asd",
// 			passwor:"asd"
// 		}
// 	},
// 	reducers:{
// 		getuser(state){
// 			state.user,username=action.user1
// 		}
// 	}
// })
// export const {getuser} = counterSlice.actions
// export default counterSlice.reducers
// const userState = {
// 	user:{
// 		username:"asd",
// 		passwor:"asd"
// 	}
// }
// const counterReducer = (state = userState, action) => {
// 	switch (action.type) {
// 		case "getuser":
// 			return { ...state, user: state.user.username = action.user1}
// 		default:
// 			return { ...state }
// 	}
// }
// const textlistState={
// 	list:[]
// }
// const textReducer = (state = textlistState, action) => {
// 	switch (action.type) {
// 		case "getlist":
// 			return { ...state, list: state.list = action.textlist }
// 		default:
// 			return { ...state }
// 	}
// }
// const reducer = combineReducers({counterReducer,textReducer})
// export const store = createStore(reducer)